<template>
  <div>
    <el-page-header @back="goBack" :content=teacherForm.teacherName >
   
    </el-page-header>
    <el-row>
      <el-col :span="6">
        <el-card>
          <div slot="header" class="clearfix">
            <span>基础信息</span>
          </div>
          <div class="text item" style="width:100%">
            <div style="text-align:center"><img :src="'http://101.43.223.224:8765/image/getImageById?id=' + teacherForm.teacherImg" style="width:120px;height:120px;border-radius:50%"></div>
            <el-divider class="aaaa"></el-divider>
            <div><span>用户名</span><span style="float:right">{{teacherForm.liveNumber}}</span></div>
            <el-divider class="aaaa"></el-divider>
            <div><span>手机号</span><span style="float:right">{{teacherForm.phone}}</span></div>
            <el-divider class="aaaa"></el-divider>
            <div><span>邮箱</span><span style="float:right">{{teacherForm.email}}</span></div>
            <el-divider class="aaaa"></el-divider>
            <div><span>地址</span><span style="float:right">{{teacherForm.address}}</span></div>
            <el-divider class="aaaa"></el-divider>
            
          </div>
        </el-card>
      </el-col>
      <el-col :span="17">
        <el-card>
          <div slot="header" class="clearfix">
            <span>教师信息</span>
          </div>
          <div class="text item" style="width:100%">
            <div style="text-align:center"><img :src="'http://101.43.223.224:8765/image/getImageById?id=' + teacherForm.teacherImg" style="width:120px;height:120px;border-radius:50%"></div>
            <el-divider class="aaaa"></el-divider>
            <div><span>教师姓名</span><span style="float:right">{{teacherForm.teacherName}}</span></div>
            <el-divider class="aaaa"></el-divider>
            <div>
              <span>性别</span><span style="float:right" v-if="teacherForm.gender==1">男</span>
              <span style="float:right" v-if="teacherForm.gender==2">女</span>
            </div>
            <el-divider class="aaaa"></el-divider>
            <div><span>学历</span><span style="float:right">{{teacherForm.educationId}}</span></div>
            <el-divider class="aaaa"></el-divider>
            <div><span>工龄</span><span style="float:right">{{teacherForm.seniority}}</span></div>
            <el-divider class="aaaa"></el-divider>
            <div><span>教师介绍</span><span style="float:right">{{teacherForm.teacherInfo}}</span></div>
            <el-divider class="aaaa"></el-divider>
            <div style="text-align:center"><img :src="'http://101.43.223.224:8765/image/getImageById?id=' + teacherForm.teacherImg" style="width:120px;height:120px;border-radius:50%"></div>
            <el-divider class="aaaa"></el-divider>
            <div style="text-align:center"><img :src="'http://101.43.223.224:8765/image/getImageById?id=' + teacherForm.teacherImg" style="width:120px;height:120px;border-radius:50%"></div>
            <el-divider class="aaaa"></el-divider>
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  data () {
    return {
      teacherForm :{
        teacherName :'',
        teacherId :0,
      }
    }
  },
  mounted (){
    this.teacherId = this.$route.params.id;
    this.selectTeacher()
  },
  methods :{
    goBack () {
        this.$router.push('/teacher')
    },
    selectTeacher(){
       this.$axios
        .get("/teacher/selectTeacherById", {
          params: {
            id: this.teacherId,
          },
        })
        .then((res) => {
          if ((res.code = 200)) {
            this.teacherForm = res.data.data
          }
        })
        .catch((err) => {});
    },
  }
}
</script>

<style>

</style>
